package utils

//start

type Yaml struct {
	MysqlDB       MysqlDB    `yaml:"MysqlDB"`
	RedisConf     Redis      `yaml:"Redis"`
	JwtConf       JwtConf    `yaml:"JwtConf"`
	Server        Server     `yaml:"Server"`
	AliOssConf    AliOssConf `yaml:"AliOss"`
	TimeLayoutStr string     `yaml:"TimeLayoutStr"`
	VerifySign    bool       `yaml:"VerifySign"`
	Email         Email      `yaml:"Email"`
	Phone         Phone      `yaml:"Phone"`
	OCR           OCR        `yaml:"OCR"`
}

type Server struct {
	Host string `yaml:"host"`
	Port string `yaml:"port"`
}

type MysqlDB struct {
	User         string `yaml:"user"`
	Password     string `yaml:"passWord"`
	Address      string `yaml:"address"`
	DatabaseName string `yaml:"databaseName"`
	Port         int64  `yaml:"port"`
}

type Redis struct {
	Host                       string `yaml:"host"`
	PassWord                   string `yaml:"passWord"`
	Port                       string `yaml:"port"`
	DatabaseName               int    `yaml:"db"`
	VerificationRedisKeyPrefix string `yaml:"verificationRedisKeyPrefix"`
}

type JwtConf struct {
	IsSuer    string `yaml:"issuer"`
	ExpTime   int64  `yaml:"expTime"`
	NotBefore int64  `yaml:"notBefore"`
	AppSecret string `yaml:"appSecret"`
}

type AliOssConf struct {
	AccessKeyID        string `yaml:"ossAccessKeyID"`
	StsAccessKeyID     string `yaml:"ossStsAccessKeyID"`
	AccessKeySecret    string `yaml:"ossAccessKeySecret"`
	StsAccessKeySecret string `yaml:"ossStsAccessKeySecret"`
	Bucket             string `yaml:"ossBucket"`
	RoleArn            string `yaml:"ossRoleArn"`
	EndPoint           string `yaml:"ossEndPoint"`
	PolicyFile         string `yaml:"policyFile"`
	CallBackHost       string `yaml:"ossCallBackHost"`
}

type Email struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Base     string `yaml:"base"`
	Auth     string `yaml:"auth"`
	FromName string `yaml:"fromName"`
}

type Phone struct {
	AccessKeyId     string `yaml:"accessKeyId"`
	AccessKeySecret string `yaml:"accessKeySecret"`
	Method          string `yaml:"method"`
	Scheme          string `yaml:"scheme"`
	Domain          string `yaml:"domain"`
	Version         string `yaml:"version"`
	ApiName         string `yaml:"apiName"`
	RegionId        string `yaml:"regionId"`
	SignName        string `yaml:"signName"`
	TemplateCode    string `yaml:"templateCode"`
}

type OCR struct {
	AccessKeyId     string `yaml:"accessKeyId"`
	AccessKeySecret string `yaml:"accessKeySecret"`
}
